﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<VideoInputModels>" %>

<%@ Import Namespace="ChoViet.Lib.Helpers" %>
<%@ Import Namespace="ChoViet.Admin.ViewModels" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Xem chi tiết video
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script src="/Scripts/swfobject.js" type="text/javascript"></script>
    <%if (ViewData["MessageInfo"] == null)
      { %>
    <table class="admintable" width="100%">
        <tbody>
            <tr>
                <td class="key">
                    Chuyên mục
                </td>
                <td>
                    <%= string.IsNullOrEmpty(Model.CatName) ? "--" : Model.CatName%>
                </td>
            </tr>
            <tr>
                <td class="key">Công ty</td>
                <td><%=Model.CompanyName %></td>
            </tr>
            <tr>
                <td class="key">Dự án</td>
                <td><%=Model.ProjectName %></td>
            </tr>
            <tr>
                <td class="key">
                    Tiêu đề
                </td>
                <td>
                    <%=Html.Encode(Model.Video.Name) %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Mô tả
                </td>
                <td>
                    <%=Model.Video.Description%>
                </td>
            </tr>
            <tr>
				<td class="key">File đính kèm</td>
				<td>
                   <% if (Model.Video.VideoPath != null && Model.Video.VideoPath != string.Empty)
                        {
                    %>
                    <embed height="350" width="450" flashvars="file=<%=Model.VideoUrl%>&lightcolor=000000&frontcolor=000000"
                        allowscriptaccess="always" allowfullscreen="true" quality="high" bgcolor="#FFFFFF"
                        name="ply" id="ply" style="" src="/FlashPlayer/TSPlayer.swf" type="application/x-shockwave-flash" />
                    <%} %>
                    <%if (Model.Video.Code != null && Model.Video.Code != string.Empty)
                      { %>
                      <%=Model.Video.Code %>
                    <%} %>
				</td>
			</tr>
			<tr>
                <td class="key">Danh sách tags</td>
                <td>
                    <%foreach (var itemtag in Model.Tags)
                      {
                        if (Model.ListTagID.Contains(itemtag.ID)) {  %>
                        <%=itemtag.Keyword%>,
                    <%}} %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Trạng thái hiển thị
                </td>
                <td>
                    <img alt="" id="imgPubYN_<%= Model.Video.ID %>" onclick="ChangeNewYN(<%= Model.Video.ID %>);"
                        value="<%= Model.Video.PubYN %>" src="<%= Model.Video.PubYN ? "/Images/icon-32-apply.png" : "/Images/icon-32-cancel.png" %>" />
                </td>
            </tr>
            <tr>
                <td class="key">
                    Trang chủ
                </td>
                <td>
                    <img alt="" id="imgHomeYN_<%= Model.Video.ID %>" onclick="ChangePubYN(<%= Model.Video.ID %>);"
                        value="<%= Model.Video.HomeYN.Value %>" src="<%= Model.Video.HomeYN.HasValue && Model.Video.HomeYN.Value ? "/Images/icon-32-apply.png" : "/Images/icon-32-cancel.png" %>" />
                </td>
            </tr>
        </tbody>
    </table>
    <%} %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
    <td>
        <%= Html.Toolbar("Sửa", "/Video/Edit/" + Model.Video.ID, "edit")%>
    </td>
    <td>
        <%= Html.Toolbar("Xoá", "/Video/Delete/" + Model.Video.ID, "delete")%>
    </td>
    <td>
        <%= Html.Toolbar("Quay về", "/Video", "back")%>
    </td>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
    Xem chi tiết video
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
    <%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>
</asp:Content>
